<!DOCTYPE html>
<html>
<head>
    <title>js面向对象--原型与in操作符</title>
    <meta charset="utf-8"/>
    <script>
        function Persion(){
            //alert("111");
        }
        Persion.prototype.name = "Nike";
        Persion.prototype.age = 30;
        Persion.prototype.job = "SoftWare";
        Persion.prototype.sayName = function(){
            alert(this.name);
        }

        var persion1 = new Persion();
        var persion2 = new Persion();

        persion1.name = "GaoLei";
        alert(persion1.hasOwnProperty("name"));

        alert(persion1.name);
        alert(persion2.name);

        delete persion1.name;
        alert(persion1.name);
        alert(persion2.name);
    </script>
</head>
<body>
</body>
</html>